<include file="__THEME__/header" />
<include file="__THEME__/page_top" />

<div class="clear"></div>
<div class="w_970 b_tf">
	<div class="fl w_720">
		<div class="">
			<h2 class="t_26 c_666 bold_n p_t25 m_b15">作为观众会员注册</h2>
			<p class="t_14 c_666 m_b15">作为一个观众会员，你可以跟随所有艺术家一起，开始你的索乐之旅！</p>
			<p class="m_b15 c_999">
				使用以下帐号登录：<a href="#" class="icon_xl di"></a><a href="#" class="icon_rr di"></a><a href="#" class="icon_qq di"></a><a href="#" class="icon_dd di"></a>
			</p>
		</div>

		<h2 class="t_14 c_333 b_b p_t10 p_b10 m_b10">创建索乐网帐号</h2>
		<form name="ajax_register_form" id="ajax_register_form" method="POST" action="{:U('public/Register/save')}">
		<input name="professional" type="hidden" value="{$_GET['professional']}">
		<div class="login_dl ov p_t25">
			<!-- <a href="#" class="ab"><img src="../images/50x50.jpg" width="50" height="50" /></a> -->
			<dl>
				<dt>帐号：</dt>
				<dd>
					<input id="phoneOrEmail" name="phoneOrEmail" checkurl="{:U('public/Register/isEmailAvailable')}"  
						type="text" value="" class="iut c_999 b_fff" placeholder="邮箱或者手机" autocomplete="off" >
					<div class="bc c_999"></div>
				</dd>

			</dl>
			<dl>
				<dt>昵称／姓名：</dt>
				<dd>
					<input id="uname" name="uname" checkurl="{:U('public/Register/isUnameAvailable')}"
						 type="text" value="" class="iut c_999" placeholder="真实姓名比较靠谱" autocomplete="off" >
					<div class="bc c_999">我们在这里的大多使用真实姓名，方便人们知道是谁</div>
				</dd>

			</dl>
			<dl>
				<dt>密码：</dt>
				<dd>
					<input id="password" name="password" type="password" value="" class="iut" >
					<div class="bc c_f06">密码长度6-20位的数字、字母组合</div>
				</dd>

			</dl>
			<dl>
				<dt>重复密码：</dt>
				<dd>
					<input  id="repassword"  name="repassword" type="password" value="" class="iut"><i class="icon_gou di"></i>
				</dd>

			</dl>
			<dl>
				<dt>验证码／激活码：</dt>
				<dd>
					<input id="verify" name="verify" type="text" value="" class="iut m_r10" style="width: 120px">
					<a href="#" class=" m_r10">
						<img src="__ROOT__/public/captcha.php" id="verifyimg" class="alM" 
							onclick="change_verify()"  width="93" height="35" />
					</a>
					<a href="javascript:;" onclick="change_verify()" class="c_009  m_r10">换一张</a>
					<div class="bc c_999">填写验证码让我们知道你是人类</div>
				</dd>

			</dl>
			<dl>
				<dd>
					<input type="checkbox" class="m_r15" /><label class="c_999">我已经阅读并接受<a href="#" class="c_009">《用户协议》</a></label>
				</dd>

			</dl>

			<dl>
				<dd>
					<a class="tc butas bor di b_fff w_255 c_f06 fl" 
						href="javascript:;" onclick="$('#ajax_register_form').submit();">注册</a>
				</dd>

			</dl>

		</div>
		</form>
	</div>
	<div class="fr w_220">
		<div class="b_b login_110 m_b10" style="padding-top: 68px">
			<p class="t_14 c_666" style="padding-top: 80px">有问题吗？</p>
		</div>
		<p class=" c_666 l_20">
			有关帐户注册的更多信息，请查看<a href="#" class="c_009">我们的常见问题</a>。
		</p>
	</div>
</div>
<script>
function change_verify(){
	var date = new Date();
	var ttime = date.getTime();
	var url = SITE_URL+'/public/captcha.php';
	$('#verifyimg').attr('src',url+'?'+ttime);
}

$(document).ready(function() { 
    $('#ajax_register_form').submit(function(){
        $(this).ajaxSubmit({
            beforeSubmit:  function(){
            	if($('#phoneOrEmail').val().length == 0) {
            		ui.error('帐号不能为空');
                    return false;
                }
            	if($('#phoneOrEmail').val().length == 0) {
            		ui.error('昵称／姓名不能为空');
                    return false;
                }
            	if($('#password').val().length == 0) {
            		ui.error('密码');
                    return false;
                }
            	if($('#repassword').val().length == 0) {
            		ui.error('重复密码');
                    return false;
                }
            	if($('#verify').val().length == 0) {
            		ui.error('验证码／激活码');
                    return false;
                }
            },
            success: function(json){
            	if( json.status == 1 ){
            		ui.success(json.info);
            		window.location = json.data.jumpUrl;
            	}else{
            		ui.error(json.info);
            	}
            },
            dataType: 'json'
        }); 
        return false; 
    });
})
</script>
</body>
</html>